Fix signed/unsigned promotion errors involving Emacs_Rectangle
authorPo Lu <luangruo@yahoo.com>
Sun, 11 Feb 2024 02:00:33 +0000 (10:00 +0800)
committerPo Lu <luangruo@yahoo.com>
Sun, 11 Feb 2024 02:01:31 +0000 (10:01 +0800)
commite67e7185ce81e59c90741f92c2ba3209412f417e
treeed4a3db6efaeb3fca98df1e0e36be8b048054741
parent7a0ee5d65f214102734dd22edb641b164a1b73af
Fix signed/unsigned promotion errors involving Emacs_Rectangle

* src/androidterm.c (android_note_mouse_movement):

* src/pgtkterm.c (note_mouse_movement):

* src/xdisp.c (get_glyph_string_clip_rects, remember_mouse_glyph)
(expose_area, expose_window, gui_intersect_rectangles): Cast
width or height fields in Emacs_Rectangles to int before summing
with or subtracting them from their coordinate fields, as they
are unsigned outside X, and the sign of the coordinates is thus
not preserved.
src/androidterm.c
src/pgtkterm.c
src/xdisp.c